package com.hht.study.proxy.dynamic.cglib;

import com.hht.study.proxy.dynamic.jdk.IBuyService;
import com.hht.study.proxy.dynamic.jdk.JdkBuyServiceImpl;

/**
 * @author hht
 * @date 2022/3/6
 */
public class CglibTest {
    public static void main(String[] args) {
        //没有实现接口，cglib可以代理没有实现接口的类
        CglibBuyService proxy =(CglibBuyService) CglibProxyFactory.getProxy(CglibBuyService.class);

        proxy.buy ("ipad");
    }
}
